package GoFushan;

import java.util.Random;

public class Zombie extends Actor {
	public String name;
	
	public Zombie(String name) {
		this.name = name;
	}

	@Override
	public int go(City city) {
		int days = 0;
		int distance = city.getDistance();
		while(distance > 0) {
			distance -= this.getSpeed(); 
			days++;
		}
		return days;
	}
	
	public int getSpeed() {
		Random random = new Random();
		int[] s = {3,4,5,6,7,8};
		int speed = s[random.nextInt(6)];
		return speed;
	}
	/*
    public static void main(String[] args) {
		Zombie z = new Zombie("123");
		System.out.println(z.go(new City(10)));
	}
	*/

}
